import request from '@/utils/request'

// 查询产品发布列表
export function listRelease(query) {
  return request({
    url: '/product/release/list',
    method: 'get',
    params: query
  })
}
// 查询产品发布审核列表
export function listExamine(query) {
  return request({
    url: '/product/release/examineList',
    method: 'get',
    params: query
  })
}

// 查询产品发布接收列表
export function receiveList(query) {
  return request({
    url: '/product/release/receive',
    method: 'get',
    params: query
  })
}

// 查询产品发布详细
export function getRelease(productId) {
  return request({
    url: '/product/release/' + productId,
    method: 'get'
  })
}

// 新增产品发布
export function addRelease(data) {
  return request({
    url: '/product/release',
    method: 'post',
    data: data
  })
}

// 修改产品发布
export function updateRelease(data) {
  return request({
    url: '/product/release',
    method: 'put',
    data: data
  })
}

// 删除产品发布
export function delRelease(productId) {
  return request({
    url: '/product/release/' + productId,
    method: 'delete'
  })
}

// 审核产品发布
export function examine(productId) {
  return request({
    url: '/product/release/examine/' + productId,
    method: 'get'
  })
}

export function endStatus(data) {
  return request({
    url: '/product/release/termination',
    method: 'post',
    data: data
  })
}


